1 package controllers
.actions
;
2 import javax
.swing
.undo
.AbstractUndoableEdit
;
4 import models
.GraphEdge
;
5 import models
.GraphVertex
;
8 public class AddEdge
extends AbstractUndoableEdit
{
9 private static final long serialVersionUID
= -7929100929760152271L;
11 private SelectionController selectionController
;
13 public AddEdge(GraphVertex a
, GraphVertex b
,SelectionController selectionController
)
15 o
= new GraphEdge(a
,b
);
16 this.selectionController
= selectionController
;
20 private void redoAction()
22 selectionController
.getModel().addEdge(o
);
34 selectionController
.getModel().removeEdge(o
);
37 public boolean isSignificant(){
41 public String
getPresentationName(){
42 return "Edge toevoegen.";